EXTRA_DIST=autogen.sh

if DEBUG
DEBUG_CFLAGS=-DDEBUG
else
DEBUG_CFLAGS=
endif

AM_CPPFLAGS = -Wall $(JANSSON_CFLAGS) $(DEBUG_CFLAGS) $(LIBAVCODEC_CFLAGS) $(LIBAVFORMAT_CFLAGS) $(LIBSWSCALE_CFLAGS)

bin_PROGRAMS=bin/clmix
bin_clmix_LDADD = $(JANSSON_LIBS) $(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS)
bin_clmix_SOURCES=src/clmix.c \
	src/audioencoder.c \
	src/audioencoder_lame.c \
	src/audioencoder_av.c \
	src/audiosource.c \
	src/audiosource_file.c \
	src/audiosource_mix.c \
	src/audiosource_pan.c \
	src/audiosource_repos.c \
	src/audiosource_trim.c \
	src/audiosource_vol.c \
	src/audiosource_ladspa.c \
	src/envelope.c \
	src/envelope_linear.c \
	src/envelope_constant.c \
	src/ladspa_default.c \
	src/ladspa_load.c \
	src/ladspa_search.c \
	src/pragmasound.c \
	src/mixtree.c \
	src/util.c

#noinst_PROGRAMS=test/slv2_test
#test_slv2_test_LDADD = $(REDLAND_LIBS)
#test_slv2_test_SOURCES=test/slv2_test.c

#noinst_PROGRAMS=test/avformat_test
#test_avformat_test_CPPFLAGS = -Wall -I./src
#test_avformat_test_LDADD=$(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS)
#test_avformat_test_SOURCES=test/avformat_test.c \
#	src/util.c

#noinst_PROGRAMS=test/decoding_encoding
#test_decoding_encoding_CPPFLAGS = -Wall -I./src
#test_decoding_encoding_LDADD=$(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS)
#test_decoding_encoding_SOURCES=test/decoding_encoding.c

noinst_PROGRAMS=test/muxing
test_muxing_CPPFLAGS = -Wall -I./src
test_muxing_LDADD=$(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS) $(LIBSWSCALE_LIBS)
test_muxing_SOURCES=test/muxing.c
